<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('未出款数据')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<input type="hidden" name="ordernumber" th:value="${orderNumber}"/>
							<li>
								<label style="width: 100px;">流水号：</label>
								<input type="text" name="settle_serial"/>
							</li>
							<li>
								<label style="width: 100px;">服务商编号：</label>
								<input type="text" name="agent_num"/>
							</li>
							<li>
								<label style="width: 100px;">服务商名称：</label>
								<input type="text" name="agent_name"/>
							</li>
							<li>
								<label style="width: 100px;">结算类型：</label>
								<select name="profit_type">
									<option value="">请选择</option>
									<option value="0">代理商直推分润</option>
									<option value="1">团队分润</option>
									<option value="2">引流奖励</option>
									<option value="3">达标返现</option>
									<!--<option value="4">高签分润</option>-->
								</select>
							</li>
							<li>
								<label style="width: 100px;">结算周期：</label>
								<select name="cycle">
									<option value="">请选择</option>
									<option value="0">日返</option>
									<option value="1">月返</option>
								</select>
							</li>
							<li>
								<label style="width: 100px;">账户类型：</label>
								<select name="nature">
									<option value="">请选择</option>
									<option value="1">对公</option>
									<option value="2">对私</option>
								</select>
							</li>
							<li>
								<label style="width: 100px;">机具类型：</label>
								<select name="mer_category">
									<option value="">请选择</option>
									<option value="0">传统</option>
									<option value="1">Mpos</option>
									<option value="4">电签pos</option>
									<option value="5">GB传统</option>
									<option value="6">GB电签</option>
									<option value="7">GB电签二</option>

								</select>
							</li>
							<li>
								<label style="width: 100px;">结算卡号：</label>
								<input type="text" name="screen_num"/>
							</li>
							<li>
								<label style="width: 100px;">结算人：</label>
								<input type="text" name="screen_name"/>
							</li>
							<li>
								<label style="width: 100px;">最低金额：</label>
								<input type="text" name="lower_money"/>
							</li>
							<li class="select-time">
								<label style="width: 100px;">日期：</label>
								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="mindDate"/>
								<span>-</span>
								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="maxDate"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "agentInfo/profitSbOrder";

		$(function()  {
            var options = {
                url: prefix + "/detailList",
		        showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
                columns: [
				{
					field : 'SETTLE_SERIAL',
					title : '流水号',
					width: "300",
					formatter:function (value, row, index) {
						return value+$.table.tooltip('[备注]'+row.NOTE,4);
					}
				},
				{
					field : 'AGENT_NUM',
					title : '服务商编号'
				},
				{
					field : 'AGENT_NAME',
					title : '服务商名称',
					formatter:function (value, row, index) {
						return $.table.tooltip(value,4);
					}
				},
				{
					field : 'AUDITDATE',
					title : '生成日期'
				},
					{
						field: 'PROFIT_TYPE',
						title: '类型', //3一段达标返现 4二段达标 5三段达标 6提现奖励
						formatter:function(value,row,index){
							if (value == '0'){
								return '<span style="color: #008000">代理商直推分润</span>';
							} else if (value == '1'){
								return '<span style="color: #008000">团队分润</span>';
							} else if (value == '2'){
								return '<span style="color: #006dcc">引流奖励</span>';
							} else if (value == '3'){
								return '<span style="color: #006dcc">一段达标返现</span>';
							} else if (value == '4'){
								return '<span style="color: #006dcc">二段达标返现</span>';
							} else if (value == '5'){
								return '<span style="color: #006dcc">三段达标返现</span>';
							} else if (value == '6'){
								return '<span style="color: #006dcc">提现奖励</span>';
							} else if (value == '7'){
								return '<span style="color: #006dcc">交易增量分润</span>';
							} else if (value == '8'){
								return '<span style="color: #006dcc">累计采购分润</span>';
							} else if (value == '11'){
								return '<span style="color: #006dcc">自采购奖励(4元)</span>';
							} else if (value == '12'){
								return '<span style="color: #006dcc">团员采购奖励(8元)</span>';
							} else if (value == '14'){
								return '<span style="color: #006dcc">引流人员奖励政策</span>';
							} else if (value == '15'){
								return '<span style="color: #006dcc">引流人员入团补差</span>';
							} else if (value == '16') {
								return '<span style="color: #006dcc">累计采购奖励政策</span>';
							} else if (value == '17') {
								return '<span style="color: #006dcc">团交易同比增量奖励</span>';
							} else if (value == '18') {
								return '<span style="color: #006dcc">交易量新增一千万返现</span>';
							}else if (value == '19') {
								return '<span style="color: #006dcc">雏鹰计划奖励</span>';
							}else if (value == '20') {
								return '<span style="color: #006dcc">210激团奖（团长引流奖励 A）</span>';
							}else if (value == '21') {
								return '<span style="color: #006dcc">传统引流奖励</span>';
							}else if (value == '22') {
								return '<span style="color: #006dcc">分润税奖励</span>';
							}else if (value == '24') {
								return '<span style="color: #006dcc">底薪计划</span>';
							}else {
								return '<span style="color: #ff0000">未知</span>';
							}
						}
				},
				{
					field : 'CYCLE',
					title : '周期',
					formatter: function(value, row, index) {
						if ("0"==value){
							return '<span style="color:blue;">日返</span>';
						}else if("1"==value){
							return '<span style="color:green;">月返</span>';
						}else{
							return '<span style="color:red;">未知</span>';
						}
					}
				},
				{
					field : 'BANK_NAME',
					title : '开户行名称'
				},
				{
				    field : 'BANK_HEADNAME',
				    title : '总行名称'
				},
				{
					field : 'SCREEN_NAME',
					title : '结算人'
				},
				{
					field : 'SHOW_SCREENNUM',
					title : '结算卡'
				},
				{
					field : 'MONEY',
					title : '结算金额(元)',
					formatter: function(value, row, index) {
						return $.table.rmbFormatter(value);
					}
				},
				{
					field : 'PAY_TIME',
					title : '付款时间'
				},

				{
					field : 'STATUS',
					title : '出款状态',
					formatter: function(value, row, index) {
						if ("0"==value){
							return '<span style="color:blue;">待处理</span>';
						}else if("1"==value){
							return '<span style="color:green;">出款成功</span>';
						}else if("-2"==value){
							return '<span style="color:#880000;">出款失败</span>';
						}else if("-3"==value){
							return '<span style="color:green;">冻结</span> ';
						}else if("-1"==value){
							return '<span style="color:green;">已上送</span>';
						}else{
							return '<span style="color:red;">出款失败</span>';
						}
					}
				},
				{
					field : 'AGENT_TYPE',
					title : '机具类型',
					formatter: function(value, row, index) {
						if ("0"==value){
							return '传统';
						}else if("1"==value){
							return 'Mpos';
						}else if("2"==value){
							return '智能Pos';
						}else if("3"==value){
							return '机构';
						}else if("4"==value){
							return '电签POS';
						}else if("5"==value){
							return 'GB传统';
						}else if("6"==value){
							return 'GB电签';
						}else if("7"==value){
							return 'GB电签二';
						}else{
							return '<span style="color:red;">未知</span>';
						}
					}
				},]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
